import {Axios} from '@/network/axios'
export const userLogin =
    (account,password)=>new Promise((resolve,reject)=>{
    Axios('GET','/userLogin',{
      account:account,
      password:password
    },null).then(response=>{
      let optionResult = response.data
      if (optionResult.status){
        resolve(optionResult.result)
      }else {
        reject(optionResult.message)
      }
    }).catch(error=>{
      reject(error)
    })
})

export const fetchUserInfo =
        zrId=>new Promise((resolve,reject)=>{
          Axios('GET','user/getUserInfo',{zrId:zrId},null)
              .then(response=>{
                let optionResult = response.data
                if (optionResult.status){
                  resolve(optionResult.result)
                }else {
                  reject(optionResult.message)
                }
              })
              .catch(error=>{
                reject(error)
              })
        })

